Accessory power management

ABSTRACT

Methods, apparatus, and circuits for managing power among portable computing devices and one or more accessories. One example provides commands to improve power management between a portable computing device and one or more accessories. Other examples provide commands that may allow a portable computing device to charge at a maximum available current level while providing an accessory with sufficient current for its proper operation. Another may help prevent a portable computing device from drawing a high level of current that could be detrimental to an accessory, while others provide commands that may allow a battery pack to instruct a portable computing device to not charge its internal battery. Another example may allow a portable computing device to determine which power supply among multiple power supplies should be used to power an accessory, while others may allow an accessory to retrieve charging current parameters from a portable computing device.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims the benefit of U.S. provisional patentapplication No. 61/292,689, filed Jan. 6, 2010, which is incorporated byreference.

BACKGROUND

The popularity of various portable electronic devices has exploded thepast several years and the public's fascination and desire for newdevices shows no signs of abating. Along with this increase inpopularity, the number of types of these portable devices has grownconsiderably, and the functionality of these devices has diversifiedtremendously.

Interestingly, this diversification has become so thorough that it hasbegun to lead to a convergence. One such convergence is occurring withportable computing devices.

Smaller devices, such as phones, can now be used to perform functionsthat were previously limited to larger computing devices. These gobeyond native functions, such as actually calling people, and includelistening to music, watching movies, viewing documents, surfing the web,and reading email. Larger devices, such as netbooks, are slimming downto ultraportable size by jettisoning their optical drives and otherfunctionality.

The evolution of these devices is thus converging towards a commondestination: the portable computing device. These portable computingdevices may handle various functions currently assigned to phones andnetbooks. They may be used to listen to music, watch movies, view andedit documents, surf the web, read email and books, as well as myriadother functions.

Users of these portable computing devices often place them in a dockingstation. These docking stations may provide mechanical support for theportable computing devices, holding them in place in a roughly uprightmanner so that the screen can be viewed easily. Other accessories may beused with these portable computing devices as well. These accessoriesoften provide power to the portable computing device, which is used torun circuitry on the portable computing device and to charge itsinternal battery.

These portable computing devices have comparatively large batteries anda correspondingly large current is required to charge them. But whilethe portable computing device's batteries are charging, the accessoriesrequire current for their operation. Also, some accessories may only beable to safely supply a certain amount of current.

Thus, what is needed are methods, apparatus, and circuits for managingpower among these portable computing devices and one or moreaccessories.

SUMMARY

Accordingly, embodiments of the present invention provide methods,apparatus, and circuits for managing power among portable computingdevices and one or more accessories. An illustrative embodiment of thepresent invention provides a set of commands and supporting circuitrythat provides improved power management between a portable computingdevice and one or more accessories.

An illustrative embodiment of the present invention provides commandsthat may allow a portable computing device to charge at a maximumavailable current level while providing an accessory with sufficientcurrent for its proper operation. Another illustrative embodiment of thepresent invention may help prevent a portable computing device fromdrawing a high level of current that could be detrimental to anaccessory, such as a cable. Another illustrative embodiment of thepresent invention may allow a battery pack or other accessory toinstruct a portable computing device to not charge its internal battery.Another illustrative embodiment of the present invention may allow aportable computing device to determine which power supply among multiplepower supplies should be used to power an accessory. Yet anotherillustrative embodiment of the present invention may allow an accessoryto get charging current parameters from a portable computing device.

One illustrative embodiment of the present invention provides a methodof operating an accessory. In this method, the accessory may establish aconnection with a portable computing device and receives power from anexternal power source. The accessory may determine a current capabilityof the external power source, and then may determine a net currentcapability by deducting a current requirement of the accessory from thecurrent capability of the external power source. The accessory may thensignal to the portable computing device that the portable computingdevice is to draw a current having a limit equal to the net currentcapability.

Another illustrative embodiment of the present invention provides amethod of operating a portable computing device. In this method, theportable computing device may establish a connection with an accessory.The portable computing device may then receive an indication of acurrent capability of an external power source powering the accessory.The portable computing device may also receive a power instruction fromthe accessory, where the power instruction may indicate a currentrequirement of the accessory. The portable computing device may thendetermine a net current capability by deducting the current requirementof the accessory from the current capability of the external powersource. A current having a limit equal to the net current capability maythen be drawn by the portable computing device.

Another illustrative embodiment of the present invention providesanother method of operating a portable computing device. This method mayinclude establishing a connection with a power source via a cable,receiving an indication that the power source can supply current atfirst level, receiving an indication that the cable can supply currentat a lower second level, and drawing a current having a limit equal tothe lower second level.

Another illustrative embodiment of the present invention provides amethod of operating a portable computing device. This method may includeestablishing a connection with a battery pack, receiving a command tooperate circuitry using current from the battery pack without chargingthe internal battery, and drawing a current to operate the internalcircuitry without charging the internal battery.

Another illustrative embodiment of the present invention provides amethod of operating an accessory. In this method, the accessory mayestablish a connection with a portable computing device. The accessorymay then provide a request to the portable computing device inquiringwhether the accessory should use a first power source or a second powersource to power the accessory. The accessory may then receive aninstruction indicating which power source to use to power the accessory.The accessory may then use the indicated power source to power itself.

Yet another illustrative embodiment of the present invention provides amethod of operating an accessory. This method may include establishing aconnection with a portable computing device, providing a request for acharging parameter to the portable computing device, and receiving thecharging parameter from the portable computing device.

Still another illustrative embodiment of the present invention providesa method of operating a portable computing device. This method mayinclude establishing a connection with an accessory, reading a resistoridentification on the accessory, determining a set of one or moredefault values based on the resistor identification, receiving a commandfrom the accessory to modify the set of one or more default values, andmodifying the set of one or more default values.

Various embodiments of the present invention may incorporate one or moreof these and the other features described herein. A better understandingof the nature and advantages of the present invention may be gained byreference to the following detailed description and the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an electronic system that may be improved by theincorporation of embodiments of the present invention;

FIG. 2 is a simplified block diagram of a system including a portablecomputing device and an accessory according to an embodiment of thepresent invention;

FIG. 3 illustrates an electronic system that is improved by theincorporation of embodiments of the present invention;

FIG. 4 illustrates a packet format that may be employed by an embodimentof the present invention;

FIG. 5 illustrates the flow of commands and information between anaccessory and portable computing device when utilizing set commands;

FIG. 6 illustrates command and data communication between an accessoryand a portable computing device where both acknowledgments andnotifications are employed;

FIG. 7 illustrates the flow of get and return commands in an electronicsystem including an accessory and a portable computing device;

FIG. 8 is a table listing commands employed by various embodiments ofthe present invention to manage power between an accessory and aportable computing device;

FIG. 9 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 10 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention;

FIG. 11 illustrates a method of controlling a level of current drawn bya portable computing device according to an embodiment of the presentinvention;

FIG. 12 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 13 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention;

FIG. 14 is a flowchart illustrating the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention;

FIG. 15 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 16 illustrates the activities of a cable and a portable computingdevice according to an embodiment of the present invention;

FIG. 17 is a flowchart illustrating the activities of a cable and aportable computing device according to an embodiment of the presentinvention;

FIG. 18 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 19 illustrates the activities of a battery pack and a portablecomputing device according to an embodiment of the present invention;

FIG. 20 illustrates a flowchart of the activities of a battery pack anda portable computing device according to an embodiment of the presentinvention;

FIG. 21 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 22 illustrates the activities performed by an accessory andportable computing device according to an embodiment of the presentinvention;

FIG. 23 is a flowchart illustrating the activities performed anaccessory and a portable computing device according to an embodiment ofthe present invention;

FIG. 24 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 25 illustrates activities performed by an accessory and a portablecomputing device according to an embodiment of the present invention;

FIG. 26 illustrates a flowchart of the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention;

FIG. 27 illustrates an electronic system according to an embodiment ofthe present invention;

FIG. 28 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention; and

FIG. 29 is a flow chart illustrating the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIG. 1 illustrates an electronic system that may be improved by theincorporation of embodiments of the present invention. This figure, aswith the other included figures, is shown for illustrative purposesonly, and does not limit either the possible embodiments of the presentinvention or the claims.

This figure includes portable computing device 150 and accessory 130. Inthis example, accessory 130 is a docking station, though in otherexamples accessory 130 may be other types of devices, such as radios,monitors, interactive displays, and others. In this example, portablecomputing device 150 is a tablet computer, though in other systems itmay be other types of devices, such as a portable media player, cellphone, monitor, or other electronic device.

Accessory 130 may include insert 135 having insert opening 140. Portablecomputing device 150 may have one or more receptacles 155 and 160. Thesereceptacles 155 and 160 may include receptacle tongues 165. Whenportable computing device 150 is mated with accessory 130, insert 135may fit in either receptacle 155 or 160. The corresponding receptacletongue 165 may fit into insert opening 140. Contacts (not shown) onreceptacle tongue 165 form electrical connections with contacts ininsert opening 140. These electrical connections form pathways for powerand signals that may be shared between accessory 130 and portablecomputing device 150.

Accessory 130 and portable computing device 150 may include variouselectronic circuitry for managing and sharing power and data signals.Examples of these circuits are shown in the following figure.

FIG. 2 is a simplified block diagram of a system 200 including portablecomputing device 250 and accessory 230 according to an embodiment of thepresent invention. In this embodiment, portable computing device 250(e.g., implementing portable computing device 150 of FIG. 1) can providecomputing, communication and/or media playback capability. Portablecomputing device 250 can include processor 210, storage device 212, userinterface 214, power control 216, network interface 218, and accessoryinput/output (I/O) interface 220. Portable computing device 250 can alsoinclude other components (not explicitly shown) to provide variousenhanced capabilities.

Storage device 212 can be implemented using disk, flash memory, or anyother non-volatile storage medium. In some embodiments, storage device212 can store media assets such as audio, video, still images, or thelike, that can be played by portable computing device 250. Storagedevice 212 can also store other information such as a user's contacts(names, addresses, phone numbers, etc.); scheduled appointments andevents; notes; and/or other personal information. In some embodiments,storage device 212 can store one or more application programs to beexecuted by processor 210 (e.g., video game programs, personalinformation management programs, media playback programs, etc.).

User interface 214 can include input devices such as a touch pad, touchscreen, scroll wheel, click wheel, dial, button, switch, keypad,microphone, or the like, as well as output devices such as a videoscreen, indicator lights, speakers, headphone jacks, or the like,together with supporting electronics (e.g., digital-to-analog oranalog-to-digital converters, signal processors, or the like). A usercan operate input devices of user interface 214 to invoke thefunctionality of portable computing device 250 and can view and/or hearoutput from portable computing device 250 via output devices of userinterface 214.

Processor 210, which can be implemented as one or more integratedcircuits (e.g., a conventional microprocessor or microcontroller), cancontrol the operation of portable computing device 250. In variousembodiments of the present invention, processor 210 can execute avariety of programs in response to program code and can maintainmultiple concurrently executing programs or processes. At any giventime, some or all of the program code to be executed can be resident inprocessor 210 and/or in storage media, such as storage device 212.

Through suitable programming, processor 210 can provide variousfunctionality for portable computing device 250. For example, inresponse to user input signals provided by user interface 214, processor210 can operate a database engine to navigate a database of media assetsstored in storage device 212 in response to user input and display listsof selected assets. Processor 210 can respond to user selection of anasset (or assets) to be played by transferring asset information to aplayback engine also operated by processor 210, thus allowing mediacontent to be played. Processor 210 can also operate other programs tocontrol other functions of portable computing device 250. In someembodiments, processor 210 implements a protocol daemon and otherprograms to manage communication with one or more connected accessories(e.g., accessory 230), examples of which are described below.

Power manager 216 provides power management capability for portablecomputing device 250. For example, power manager 216 can deliver powerfrom a battery (not explicitly shown) to accessory I/O interface 220 vialine 217 and to other components of portable computing device 250 (powerconnections not shown). Power manager 216 can also receive power viaaccessory I/O interface 220 and line 219 and deliver received power tovarious components of portable computing device 250. Power received fromaccessory 230 can also be delivered to the battery, thereby allowing thebattery to be recharged via accessory I/O interface 220. In someembodiments, power manager 216 can be implemented using programmable orcontrollable circuits operating in response to control signals generatedby program code executing on processor 210 or as a separatemicroprocessor or microcontroller.

In some embodiments, power manager 216 is responsive to signals from asensor (not explicitly shown) in accessory I/O interface 220. The sensorcan generate a signal indicative of the type of accessory connected, andpower manager 216 can use this information to determine, e.g., whetherto distribute power from the battery or power received from accessoryI/O interface 220. Power manager 216 can also provide other powermanagement capabilities, such as regulating power consumption of othercomponents of portable computing device 250 based on the source andamount of available power, monitoring stored power in the battery andgenerating user alerts if the stored power drops below a minimum level,and so on.

Network interface 218 can provide voice and/or data communicationcapability for portable computing device 250. In some embodiments of thepresent invention, network interface 218 can include radio frequency(RF) transceiver components for accessing wireless voice and/or datanetworks (e.g., using cellular telephone technology, advanced datanetwork technology such as 3G or EDGE, WiFi (IEEE 802.11 familystandards), or other mobile communication technologies, or anycombination thereof), GPS receiver components, and/or other components.In some embodiments network interface 218 can provide wired networkconnectivity (e.g., Ethernet) in addition to, or instead of, a wirelessinterface. Network interface 218 can be implemented using a combinationof hardware (e.g., antennas, modulators/demodulators, encoders/decoders,and other analog and/or digital signal processing circuits) and softwarecomponents.

Accessory I/O interface 220 can allow portable computing device 250 tocommunicate with various accessories. For example, accessory I/Ointerface 220 can support connections to a computer, an external speakerdock or media playback station, a digital camera, a radio tuner (e.g.,FM, AM and/or satellite), an in-vehicle entertainment system, anexternal video device, card reader, disc reader, or the like. Inaccordance with some embodiments of the invention, accessory I/Ointerface 220 can support connection to multiple accessories in a daisychain configuration, allowing portable computing device 250 to manageconcurrent communication with multiple accessories. This can be done,for example, by associating multiple virtual ports with a physicalcommunication port provided by accessory I/O interface 220.

In some embodiments, accessory I/O interface 220 can include aconnector, such as a 30-pin connector corresponding to the connectorused on iPod® and iPhone® products, as well as supporting circuitry. Theconnector can provide connections for power and ground as well as forvarious wired communication interfaces, such as Universal Serial Bus(USB), FireWire (IEEE 1394 standard), and/or universal asynchronousreceiver/transmitter (UART). The connector can also provide connectionsfor audio and/or video signals, which may be transmitted to or fromportable computing device 250 in analog and/or digital formats. Thus,accessory I/O interface 220 can support multiple communication channels,and a given accessory can use any or all of these channels.

Accessory 230 can include controller 240, user input device 242,audio/video output device 244, power manager 246, power supply 248 andPCD I/O interface 236. Accessories can vary widely in capability,complexity, and form factor. Various accessories may include componentsthat are not shown, and may include, but are not limited to, storagedevices (disk, flash memory, etc.) with fixed or removable storagemedia; camera components such as lenses, image sensors, and controls forsame (e.g., aperture, zoom, exposure time, frame rate, etc.);microphones for recording audio (either alone or in connection withvideo recording); and so on.

Controller 240 can include a microprocessor or microcontroller executingprogram code to perform various operations associated with accessory230. For example, where accessory 230 incorporates a sound and/or videosystem, program code executed by controller 240 can include programs fordigital audio decoding, analog or digital audio processing, and thelike. Where accessory 230 incorporates a digital camera, program codeexecuted by controller 240 can include programs that allow a user tocontrol the camera to adjust settings, capture images, display images,transfer image data to another electronic apparatus, etc.

User input device 242 may include user-operable controls such as a touchpad, touch screen, scroll wheel, click wheel, dial, button, switch,keyboard, keypad, microphone, or the like. A user can operate thevarious input controls of user interface 234 to invoke functionality ofaccessory 230, and such functionality may include exchanging controlsignals, data, or other communications with portable computing device250, either directly or via an intermediary.

In some embodiments, accessory 230 can also provide output devices, suchas audio/video output device 244. In some embodiments, audio/videooutput device 244 can include speakers and/or connection ports forconnecting external speakers or headphones; a video screen and/or aconnection port for connecting an external video screen, indicatorlights, or the like, together with supporting electronics (e.g.,digital-to-analog or analog-to-digital converters, signal processors orthe like). These components can be coupled to receive audio and/or videosignals via PCD I/O interface 250. Such components can allow the user toview and/or hear output from accessory 230.

Power manager 246 can provide power management capability for accessory230. For example, power manager 246 can be configured to receive powerfrom a power supply 248. In some embodiments, power supply 248 caninclude a connection to an external power source (e.g., the standardelectric grid); for example, power supply 248 can include an AC-DCconverter that can be internal or external to accessory 230. In otherembodiments, power supply 248 can include a battery or other energystorage device. Power manager 246 can deliver power from power supply248 to various components of accessory 230. In addition, in someembodiments, power manager 246 can deliver power to upstream accessoriesvia PCD I/O interface 236.

PCD I/O interface 236 can allow accessory 230 to communicate withportable computing device 250, either directly or through anintermediary. In accordance with some embodiments of the invention, PCDI/O interface 236 can incorporate a USB interface. For example, PCD I/Ointerface 236 can provide a standard, mini, or micro USB port. In otherembodiments, PCD I/O interface 236 can include a connector that can matedirectly with a connector included in a portable computing device, suchas a 30-pin connector that mates with the connector used on variousiPod® products. Such a connector can be used to supply power to orreceive power from portable computing device 250, to receive audioand/or video signals in analog and/or digital formats, and tocommunicate information via various interfaces, such as USB, UART,and/or FireWire.

Accessory 230 can be any electronic apparatus that interacts withportable computing device 250. In some embodiments, accessory 230 canprovide remote control over operations of portable computing device 250,or a remote user interface that can include both input and outputcontrols (e.g., a display screen). Accessory 230 can control variousfunctions of portable computing device 250 and can also receive mediacontent from portable computing device 250 and present such content tothe user (e.g., through audio speakers and/or video display screen,depending on the type of media content). In other embodiments, portablecomputing device 250 can control operations of accessory 230, such asretrieving stored data from a storage medium of accessory 230,initiating an image capture operation by a camera incorporated intoaccessory 230, etc. As noted above, communication between accessory 230and portable computing device 250 can be direct or through anintermediary source, and the presence or absence of an intermediary canbe transparent to accessory 230.

It will be appreciated that the system configurations and componentsdescribed herein are illustrative and that variations and modificationsare possible. The portable computing devices and accessories may haveother capabilities not specifically described herein. For example, theymay incorporate mobile phone, global positioning system (GPS), broadbanddata communication, Internet connectivity, and the like.

Connectors at the various interfaces can be complementary or not asdesired. Where two connectors are not complementary, an adapter can beprovided to connect the two devices. While connectors may be describedherein as having pins, a term generally associated with conventionalelectronic devices having wires to connect components, it is to beunderstood that other signal paths (e.g., optical signaling) can besubstituted. Further, in some embodiments, some of the connections canbe wireless, and connectors can be omitted where wireless interfaces areprovided.

Further, while the portable computing devices and accessories aredescribed herein with reference to particular blocks, it is to beunderstood that these blocks are defined for convenience of descriptionand are not intended to imply a particular physical arrangement ofcomponent parts. Further, the blocks need not correspond to physicallydistinct components. Blocks can be configured to perform variousoperations, e.g., by programming a processor or providing appropriatecontrol circuitry, and various blocks might or might not bereconfigurable depending on how the initial configuration is obtained.Embodiments of the present invention can be realized in a variety ofapparatus including electronic devices implemented using any combinationof circuitry and software.

FIG. 3 illustrates an electronic system that is improved by theincorporation of an embodiment of the present invention. This figureincludes power supply 310, accessory 330, and portable computing device350. Power source 310 may couple to a wall outlet or other power supply,such as a car outlet. Power supply 310 may provide power to accessory330. Portable computing device 350 may connect to accessory 330 eitherdirectly or via a cable or other electronic pathway.

Power provided by power supply 310 can be used to power accessory 330and portable computing device 350. A battery (not shown) internal toportable computing device 350 may be charged using power from powersource 310. It is desirable that the power provided by power source 310be managed efficiently. Accordingly, embodiments of the presentinvention provide commands and supporting circuitry whereby portablecomputing device 350 may communicate with accessory 330 or otherelectronic device regarding the electronic system's power management.

In some embodiments, a portable computing device and an accessory cancommunicate while connected by exchanging commands and data according toa portable-computing-device-to-accessory-protocol, also referred toherein as an “accessory protocol.” The commands and data can becommunicated using any wired or wireless transport medium provided bythe relevant interfaces.

The accessory protocol defines a format for messages to be exchangedbetween a portable computing device and any accessories connectedthereto. For instance, the accessory protocol may specify that eachmessage (also referred to herein as a command) is sent in a packet witha header and an optional payload. The header provides basic information(e.g., a start indicator, length of the packet, and a command codeidentifying a command to be processed by the recipient), while thepayload provides any data associated with the command; the amount ofassociated data can be different for different commands, and somecommands may provide for variable-length payloads. In some embodiments,the commands may be defined such that any particular command code isvalid in only one direction. The packet can also include error-detectionor error-correction codes as known in the art.

The accessory protocol can define a number of “lingoes,” where a “lingo”is a group of related commands that can be supported (or unsupported) byvarious classes of accessories. In one embodiment, a command code caninclude a first byte identifying the lingo to which the command belongsand a second byte identifying the particular command within the lingo.Other command structures may also be used. It is not required that allaccessories, or all portable computing devices to which an accessory canbe connected, support every lingo defined within the accessory protocol.

In some embodiments, every accessory and every portable computing devicethat use the accessory protocol support at least a “general” lingo thatincludes commands common to the portable computing device and allaccessories. The general lingo can include commands enabling theportable computing device and the accessory to identify and authenticatethemselves to each other and to provide general information about theirrespective capabilities, including which (if any) other lingoes eachsupports. The general lingo can also include authentication commandsthat the portable computing device can use to verify the purportedidentity and capabilities of the accessory (or vice versa), and theaccessory (or portable computing device) may be blocked from invokingcertain (or all) commands or lingoes if the authentication isunsuccessful.

An accessory protocol can also include various other lingoes, such as asimple remote lingo that allows an accessory to send a commandindicating a function of the portable computing device to be invoked; aremote user interface lingo that can be used to communicate commands anddata related to replicating all or part of a user interface of aportable computing device on an accessory (thereby supporting a moreadvanced remote control), a tuner lingo that allows a user to control atuner accessory by operating the portable computing device and/or tocontrol a tuner in the portable computing device by operating anaccessory, a storage lingo that allows an accessory to store data on theportable computing device, and so on. Any lingo or combination oflingoes or other commands or groups of commands can be used inconnection with an accessory protocol.

In various embodiments of the present invention, these commands may besent as packets. These packets may include information regarding powermanagement activities. An example of such a packet is shown in thefollowing figure.

FIG. 4 illustrates a packet format for conveying commands that may beemployed by an embodiment of the present invention. This packet includespreamble or synchronizing information 410, which is followed by packetstart field 420. A load length for the packet is identified in field430. The lingo to which the command belongs is identified in field 440.The command itself is identified in field 450. The command data followsin field 460. A checksum or CRC may be performed using field 470.

The commands included in embodiments of the present invention are of twotypes, specifically, set and get commands. Set commands instruct areceiving device to set an internal value. Get commands requestinformation from the receiving device. An example of activities in asystem employing set commands is shown in the following figure.

FIG. 5 illustrates the flow of commands and information between anaccessory and portable computing device when utilizing set commands. Inthis example, acknowledgment signals that indicate that a command hasbeen received are employed. Also in this example, set commands maytravel from the accessory to a portable computing device, or from theportable computing device to an accessory.

In act 510, a set command and corresponding data may be sent by anaccessory. In act 515, the set command and data may be received by aportable computing device. In act 525, an acknowledgement may be sent bythe portable computing device, and received by the accessory in act 530.In act 535, a portable computing device may act on the set command anddata.

In various embodiments of the present invention, an acknowledgement maybe structured such that it identifies the received command that it isacknowledging. For example, the portable computing device may send anacknowledgment identifying that a specific command and data wasreceived. In other embodiments of the present invention, the set commandand data sent by the accessory in act 510 may have an identificationnumber associated with it. In this case, the acknowledgment sent by theportable computing device in act 525 may include that identificationnumber. The identification number may be tracked using a counter orother mechanism.

Again, in general, set commands may be initiated by either an accessoryor a portable computing device. Accordingly, in act 540, a set commandand data may be sent by the portable computing device. The set commandand data may be received by an accessory in act 545. In act 555 anacknowledgement may be sent by the accessory and received by theportable computing device in act 560. In act 565, the accessory can acton the set command and data.

In various embodiments of the present invention, notifications may beused. A notification differs from the acknowledgment in that anacknowledgment indicates that a command and data has been received,whereas a notification indicates that the command and data have beenacted on. In typical systems that are consistent with embodiments of thepresent invention, a portable computing device generates a large numberof notifications. Accordingly, to reduce traffic between an accessoryand the portable computing device, an accessory may register fornotifications. That is, the accessory may request that it receivesnotifications of certain types of activities performed by a portablecomputing device. On the other hand, in typical systems, portablecomputing devices do not register for notifications from an accessory,since an accessory typically does not generate a large number ofnotifications. Accordingly, it is common for an accessory to provide allnotifications to the portable computing device. Examples of this areshown on the following figure.

FIG. 6 illustrates command and data communication between an accessoryand a portable computing device where both acknowledgments andnotifications are employed. In act 610, an accessory may register fornotifications. This registration may be received in act 615 by aportable computing device. This registration may inform the portablecomputing device that the accessory would like notifications when theportable computing device performs certain classes or types offunctions. In act 620, a set command and data may be sent from theaccessory to the portable computing device. In act 625, the set commandand data may be received by the portable computing device. Anacknowledgement may be sent in act 630 by the portable computing deviceand received by the accessory in act 635. In act 640, the portablecomputing device acts on the set command and data. Once this activity iscomplete, a notification may be sent by the portable computing device inact 645. The notification may be received in act 650. At this time, theaccessory may learn that the portable computing device has updateditself and will act in a manner consistent with the command and datasent in act 620.

Again, a portable computing device typically does not register fornotifications with an accessory, though this may be performed in someembodiments of the present invention. In this example, the accessory maysend notifications for each of the activities. In act 660, a set commandand data may be sent from the portable computing device and received bythe accessory in act 665. In act 670, an acknowledgment may be sent fromthe accessory and received by the portable computing device in act 675.In act 680, the accessory may act on the set command and data. Once thisactivity is complete, a notification may be sent in act 685 from theaccessory and received in act 690 by the portable computing device.

In various situations, one device may ensure that another device isoperating in a specific manner by instructing it to do so using a setcommand and data. On occasion, one device may need to retrieveinformation regarding a function parameter from the other device. Insuch a situation, the get command may be used. As with set commands, aget command may be initiated by either an accessory or a portablecomputing device. With these commands, acknowledgements or notificationsare not needed, since the return of the requested information impliesboth the acknowledgement and notification functions. An example is shownin the following figure.

FIG. 7 illustrates the flow of get and return commands in an electronicsystem including an accessory and a portable computing device. In act710, an accessory may send a get command to a portable computing device,which receives it in act 715. In act 730, the portable computing devicemay retrieve the requested data. Often, this may be as simple as readinga value from a register. In act 740, the portable computing device mayreturn the requested data, which may be received by the accessory in act745.

Again, either the accessory or portable computing device may initiate aget command. Accordingly, in act 750, a get command may be provided byportable computing device to an accessory. In act 755, the accessory mayreceive the get command and data and retrieve the requested data in act760. After the data has been retrieved, the requested data may bereturned by the accessory in act 770, and received by the portablecomputing device in act 775.

In various embodiments of the present invention, various commands may beused for specific functions, and these commands may be used in aspecific direction. Some commands employed by various embodiments of thepresent invention, their typical direction, and their payloads, arelisted in the following figure.

FIG. 8 is a table listing commands employed by various embodiments ofthe present invention to manage power between an accessory and aportable computing device. The typical direction of flow is also shown,as it is the command's typical payload. Each of these commands isfurther elaborated upon in the following figures.

FIG. 9 illustrates an electronic system according to an embodiment ofthe present invention. This figure includes power source 910, accessory930, and portable computing device 950. Power source 910 may providepower for both accessory 930 and portable computing device 950. In sucha system, portable computing device 950 may wish to charge its internalbattery at a high a rate as possible. Accordingly, portable computingdevice 950 would like to use any current not needed for operation ofaccessory 930.

Accessory 930 may determine the current capability of power source 910.In various embodiments of the present invention, this may be achieved byreading either voltage levels or resistor values on one or more pins orsignal lines provided by power supply 910. In a specific embodiment ofthe present invention, power source 910 may provide power over a USBtype connection, where voltage levels or values of resistors on the USBdata lines indicate the current capability of power source 910. In otherembodiments of the present invention, other types of identification,such as an identification resistor, may be used. For example, powersource 910 may provide a signal or other indication as to its currentcapability. Accessory 930 can deduct the operating current that itrequires from this available current. The net available current may besent to portable computing device 950 using the SetAvailableCurrentcommand. This command may include the current limit that portablecomputing device 950 should use. That is, 1. Accessory 930 determinescurrent capability of power source 910. 2. Accessory 930 deducts itsoperating current. 3. Accessory 930 sends SetAvailableCurrent command toportable computing device 950 to draw current having a limit of currentcapability of power source 910 less accessory operating current. Theoperations performed by accessory 930 and portable computing device 950are shown in the following figure.

FIG. 10 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention. In act 1010, the accessory may determine a current capabilityof a power source. In act 1020, the accessory may deduct its own currentrequirements from the current capability of the power source todetermine a net current. In act 1030, this net current may be sent aspart of a SetAvailableCurrent command to the portable computing device,which receives the set command in act 1040. In act 1050, anacknowledgment may be sent by the portable computing device and receivedby the accessory in act 1060. In act 1070, the portable computing devicemay set the available current level to the net current. After this, theportable computing device may draw a current not exceeding the netcurrent provided by the accessory in act 1030. The portable computingdevice may provide a notification of this change to the accessory atthis time.

FIG. 11 illustrates a method of controlling a level of current drawn bya portable computing device according to an embodiment of the presentinvention. In act 1110, a connection may be established between anaccessory and a portable computing device. In act 1120, the accessorymay receive power from an external power source. The accessory maydetermine a current capability of the external power source in act 1130.In act 1140, the accessory may determine a net current capability bydeducting the required operating current from the current capability ofthe external power source. Again, this may ensure that the accessory hasenough power to operate properly. In act 1150, the accessory may signalvia the connection to the portable computing device that the portablecomputing device should draw a current having a limit equal to the netcurrent capability.

In the above example, the accessory may determine the current capabilityof the power source. In other embodiments of the present invention, theportable computing device may determine the current capability of thepower source. The portable computing device may achieve this by readingresistor values or voltage levels on lines provided by the power source.In a specific embodiment of the present invention, the accessory acts asa passthrough for these pins. This allows the portable computing deviceto read resistor values or voltage levels on these lines directly. Inother embodiments of the present invention, the accessory may read theseresistor values or voltage levels and pass the resistor values orvoltage levels on to the portable computing device. An example is shownon the following figures.

FIG. 12 illustrates an electronic system according to an embodiment ofthe present invention. In this system, portable computing device 1250may determine the current capability of power source 1210. Accessory1230 may communicate the operating current that it requires to portablecomputing device 1250 using the SetReserveCurrent command. This commandmay include in its payload the current that accessory 1230 requires forits operation. Portable computing device 1250 may then draw a currenthaving a limit that is the current capability of power source 1210 lessthe operating current needed by accessory 1230. Again, this ensures thataccessory 1230 has sufficient operating current and is notcurrent-starved by portable computing device 1250. That is, 1. Portablecomputing device 1250 determines current capability of power source1210. 2. Accessory 1230 communicates its operating current to portablecomputing device 1250 using SetReserveCurrent command. 3. Portablecomputing device draws current having a limit of current capability ofpower source 1210 less operating current of accessory 1230.

FIG. 13 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention. In act 1310, an accessory may determine its currentrequirements. In act 1320, the portable computing device may determinethe current capability of a power source. In act 1330, the accessory maysend its current requirements to the portable computing device, whichreceives them in act 1340. An acknowledgment can be sent in act 1350,and received by the accessory in act 1360. In act 1370, the portablecomputing device may deduct current requirements of the accessory fromthe current capability of the power source to determine a net current.In act 1380, the portable computing device may set an available currentto the net current. Following this, the portable computing device maydraw a current having a limit equal to the net current determined in act1370. A notification may be sent by the portable computing device to theaccessory at this time.

FIG. 14 is a flowchart illustrating the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention. In act 1410, a connection may be establishedbetween the portable computing device and the accessory. In act 1420,the portable computing device may receive an indication of a currentcapability of an external power source power from an accessory. Theportable computing device may receive an instruction from the accessoryindicating a current requirement for the accessory in act 1430. In act1440, the portable computing device may determine a net currentcapability by deducting the current requirement of the accessory fromthe current capability of the external power source. In act 1450, theportable computing device may draw a current having a limit equal to thenet current capability determined in act 1440.

In some systems, a power source may indicate that it can provide currentat a first level. However, a cable used to connect a power source to anaccessory or portable computing device may not be able to supply currentat this first level, and may only be able to provide a current at alower, second level. In such a situation, it is desirable that the cablebe able to indicate that a portable computing device should only drawcurrent at the lower, second level. Examples of how this is done areshown in the following figures.

FIG. 15 illustrates an electronic system according to an embodiment ofthe present invention. In this example, power source 1510 may providepower to portable computing device 1550 via cable 1560 and cable insert1565. Cable insert 1565 mates with a connector receptacle (not shown) onthe portable device 1550.

Power source 1510 may provide an indication that it can supply currentat a first level. Portable computing device 1550 may then read thisindication that it can draw current at the first level. Cable 1560 theninforms portable computing device 1550 that cable 1560 can providecurrent only at a lower second level. Cable 1560 may do this using theSetMaxCurrent command. Accordingly, portable computing device 1550 maydraw current at the second, lower level, thereby protecting cable 1560.That is, 1. Power source 1510 provides indication that it can supplycurrent at a first level. 2. Portable computing 1550 device readsindication that it can draw current at first level. 3. Cable 1560informs portable computing device 1530 that cable 1560 can providecurrent only at a lower second level using SetMaxCurrent command. 4.Portable computing device 1550 draws current at the lower second level.A diagram illustrating these activities is shown in the followingfigure.

FIG. 16 illustrates the activities of a cable and a portable computingdevice according to an embodiment of the present invention. In act 1610,the cable may determine its current limit. This current limit may besent in act 1620 to the portable computing device. In act 1615, theportable computing device may determine a current limit for the powersource. The portable computing device may set this as a current limit inact 1625. In act 1630, the portable computing device may receive thecurrent limit for the cable. In act 1640 the portable computing devicemay send an acknowledgment, which is received by the cable in act 1650.In act 1660, the current limit for the portable computing device may beset to the lower current limit of the cable, thereby protecting thecable.

FIG. 17 is a flowchart illustrating the activities of a cable and aportable computing device according to an embodiment of the presentinvention. In act 1710, a connection may be established between theportable computing device and a power source via the cable. In act 1720,the portable computing device may receive an indication that the powersource can supply current at a first level. The portable computingdevice may receive an indication that the cable can only supply currentat a lower, second level in act 1730. Accordingly, in act 1740, theportable computing device may draw a current having a limit equal to thelower second level.

In some embodiments of the present invention, a battery pack may be usedto supply power to a portable computing device. In such a situation, itmay be desirable that the power from the battery pack not be used tocharge an internal battery of the portable computing device. By nothaving the portable computing device charge its internal battery, butmerely operate using the current from a battery pack, the resultingpower losses due to charge transfer from the battery pack to theinternal battery are eliminated. An example is shown in the followingfigures.

FIG. 18 illustrates an electronic system according to an embodiment ofthe present invention. In this example, battery pack 1870 may providepower to portable computing device 1850 via cable 1860 and cable insert1865. In this example, battery pack 1870 may send a command to portablecomputing device 1850 to not charge the internal battery. Similarly,battery pack 1870 may send a command instructing the portable computingdevice 1850 to charge its internal battery. The battery pack may do thisusing the SetBatteryCharging command. The payload for this command mayinclude a bit indicating whether portable computing device 1850 shouldcharge its internal battery. After receiving a command to not charge itsinternal battery, portable computing device 1850 may draw a currentsufficient to operate its circuitry, but portable computing device 1850does not charge its internal battery. That is, 1. Battery pack 1870sends command to portable computing device 1850 to not charge internalbattery using SetBatteryCharging command. 2. Portable computing device1850 draws current to operate circuitry, does not charge battery.Examples of the activities performed by the elements of this system areshown in the following figure.

FIG. 19 illustrates the activities of a battery pack and a portablecomputing device according to an embodiment of the present invention. Inact 1910, a command to not charge an internal battery may be sent fromthe battery pack and received by the portable computing device in act1920. An acknowledgement may be sent in act 1930, and may be received bythe battery pack in act 1940. In act 1950, the portable computing devicemay operate its circuitry using power from the battery pack, but doesnot charge its internal battery. A notification of this change may besent from the portable computing device to the battery pack.

FIG. 20 illustrates a flowchart of the activities of a battery pack anda portable computing device according to an embodiment of the presentinvention. In act 2010, a connection may be established between theportable computing device and the battery pack. In act 2020, theportable computing device may receive a command to operate its circuitryusing current from the battery pack without charging its internalbattery. Accordingly, the portable computing device may draw a currentto operate its internal circuitry but does not charge its internalbattery in act 2030.

In various embodiments of the present invention, an accessory and aportable computing device may share more than one power line. In aspecific embodiment of the present invention, a USB power supply and anaccessory power supply may be shared between an accessory and a portablecomputing device. In such a situation, an accessory may draw currentfrom either supply. In this arrangement, power may be supplied by apower source over the USB lines. The portable computing device mayprefer that the accessory take its power requirements from the USB powersupply, thereby leaving the remaining USB power for the portablecomputing device. Alternately, the portable computing device may preferto receive all the available power from the USB line and return power tothe accessory using the accessory power supply.

Reasons for this include improved flexibility regarding the amount ofcurrent that the portable computing device can draw. For example, in aspecific embodiment of the present invention, a power source mayprovide, for example, 2.0 amps of current. An accessory may require 0.2amps of current for its operation. In a particular embodiment of thepresent invention, the accessory can instruct the portable computingdevice to draw either 1.0 or 2.0 amps of current. Since 1.8 amps isavailable to the portable computing device, the accessory instructs theportable computing device to draw 1.0 amps. Accordingly, an internalbattery of the portable computing device cannot charge as fast as itwould if it could receive the entire 1.8 amps. Thus, the portablecomputing device may wish to draw the draw 2.0 amps available on the USBsupply, and return 0.2 amps to the accessory using the accessory supplyline. This arrangement leaves a net 1.8 amps for the operation of theportable computing device and for charging its internal battery.Examples of this are shown in the following figures.

FIG. 21 illustrates an electronic system according to embodiment of thepresent invention. Power source 2110 may provide current to accessory2130 and portable computing device 2150. Portable computing device 2150and accessory 2130 may share first and second power lines 2142 and 2144.Accessory 2130 may send a command to portable computing device 2150asking which power line it should use. Accessory 2130 may do this usingthe GetPrefPower command. This command may include in its payload acurrent needed if the first power line is used and a current that may beneeded if a second power line is used. Portable computing device 1250may then instruct accessory 1230 to use the first or the second powerline 2142 and 2144, using the RetPerfPower command. This commandidentifies the power source to use in its payload.

Specifically, first power line 2142 may convey a USB power supply. Thispower supply may be derived from power source 2110 by power manager 2134in accessory 2130. Power manager 2134 may provide this power on powerline 2142 to power control 2154 in portable computing device 2150. Powercontrol 2154 may charge battery 2152 in portable computing device 2150over line 2153 using this power and provide current for the operation ofother circuitry. Battery 2152 may return power on line 2155 to powercontrol 2154. Power control 2154 may provide this battery power as anaccessory power on second power line 2144 to power manager 2134. Withthis configuration, accessory 2130 may be powered directly from the USBpower on first power line 2142, or it may receive power via battery 2152on second power line 2144. That is, 1. Portable computing device 2150and accessory 2130 share first and second power lines 2142 and 2144. 2.Accessory 2130 sends get command to portable computing device 2150asking which power line it should use using GetPrefPower command. 3.Command may include current needed if first power line 2142 used, andcurrent needed if second power line 2144 used. 4. Portable computingdevice 2150 instructs accessory 2130 as to which power line it shoulduse using RetPrefPower command. The activities performed by the devicesin this figure are shown in the following figure.

FIG. 22 illustrates the activities performed by an accessory andportable computing device according to an embodiment of the presentinvention. In act 2210, an accessory may send a command to get preferredpower, that is, whether the accessory should operate by drawing currentfrom a first or second power source. This command may be received by theportable computing device in act 2220. In act 2230, the portablecomputing device may determine the preferred power source and send thisinformation to the accessory in act 2240. In act 2250, the accessory mayreceive the preferred power source and draws current from that source inact 2260.

FIG. 23 is a flowchart illustrating the activities performed by anaccessory and portable computing device according to an embodiment ofthe present invention. In act 2310, a connection may be establishedbetween the accessory and the portable computing device. In act 2320,the accessory may provide a request to the portable computing deviceinquiring whether they accessory should use a first power source or asecond power source to power the accessory. In act 2330, the accessorymay receive an instruction indicating which power source to use to powerthe accessory. In act 2340, the accessory may use the indicated powersource to power the accessory.

In various embodiments of the present invention, it is desirable for anaccessory to read information regarding charging and power managementfrom a portable computing device. One such parameter may include themaximum charging current that the portable computing device can provide.This information may be requested and returned using theGetUltraHighPower and RetUltraHighPower commands. Examples of this areshown in the following figures.

FIG. 24 illustrates an electronic system according to an embodiment ofthe present invention. This figure includes power source 2410, accessory2430, and portable computing device 2450. Accessory 2430 may send acommand to portable computing device 2450 to retrieve charginginformation using the GetCharginglnfo command. Portable computing device2450 may return charging information to accessory 2430 using theRetChargingInfo command. That is, 1. Accessory 2430 sends get command toportable computing device 2450 to retrieve charging information usingGetChargingInfo or GetUltraHighPower commands. 2. Portable computingdevice 2450 returns charging information to accessory 2430 usingRetChargingInfo or RetUltraHighPower commands. These activities areshown in the following figure.

FIG. 25 illustrates activities performed by an accessory and a portablecomputing device according to an embodiment of the present invention. Inact 2510, an accessory may send a command to get charging information.The command to get information may be received by the portable computingdevice in act 2520. This information may then be read, for example froma register, in act 2530. In act 2540, the charging information may bereturned and received by the accessory in act 2550. This charginginformation may include charging information discussed above, such asavailable current limits, maximum current limits, the status of internalbattery charging, and other parameters.

FIG. 26 illustrates a flowchart of the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention. In act 2610, a connection may be establishedbetween the accessory and the portable computing device. A request forcharging information may be sent to the portable computing device in act2620. In act 2630, the charging information may be received from theportable computing device.

In some embodiments of the present invention, a portable computingdevice may identify an accessory by using a resistor value on theaccessory. For example, the accessory may include a resistor having aspecified value between two or more of its pins that may be used tocommunicate with the portable computing device. From thisidentification, one or more default values may be set in the portablecomputing device. On occasion, it may be desirable to override orsupplement these values with specified values. Examples of this areshown in the following figures.

FIG. 27 illustrates an electronic system according to an embodiment ofthe present invention. This figure includes power source 2710, accessory2730, and portable computing device 2750. Portable computing device 2750may detect a resistor identification on accessory 2730. Portablecomputing device 2750 may determine default values for a number ofparameters from this resistor identification. Accessory 2730 may sendone or more commands to portable computing device 2750 to override orsupplement these default values. That is, 1. Portable computing device2750 detects resistor identification from accessory 2730. 2. Portablecomputing device 2750 determines default values from resistoridentification. 3. Accessory 2730 sends commands to portable computingdevice 2750 to override or supplement default values. The activitiesperformed by these devices are shown in the following figure.

FIG. 28 illustrates the activities performed by an accessory and aportable computing device according to an embodiment of the presentinvention. In act 2810, a portable computing device may read anidentification resistor on the accessory. In act 2820, the portablecomputing device may determine default values for various parametersbased on this identification resistor. In act 2830, the accessory maysend one or more commands to supplement or override the default values.This command may be received by the portable computing device in act2840. An acknowledgement may be sent to the accessory in act 2850 andreceived by the accessory in act 2860. In act 2870, the portablecomputing device may supplement or override the default values.Notification of these changes may be provided from the portablecomputing device to the accessory.

FIG. 29 is a flow chart illustrating the activities performed by anaccessory and a portable computing device according to an embodiment ofthe present invention. In act 2910, a connection may be establishedbetween the portable computing device and the accessory. In act 2920, aresistor identification may be read on the accessory. In act 2930, theportable computing device may determine one or more default values basedon the resistor identification. In act 2940, the portable computingdevice may receive a command from accessory to modify the set of onemore default values. In act 2950, the portable computing device maymodify the set of one of more default values.

The above description of embodiments of the invention has been presentedfor the purposes of illustration and description. It is not intended tobe exhaustive or to limit the invention to the precise form described,and many modifications and variations are possible in light of theteaching above. The embodiments were chosen and described in order tobest explain the principles of the invention and its practicalapplications to thereby enable others skilled in the art to best utilizethe invention in various embodiments and with various modifications asare suited to the particular use contemplated. Thus, it will beappreciated that the invention is intended to cover all modificationsand equivalents within the scope of the following claims.

1. A method of operating an accessory, the method comprising:establishing a connection between the accessory and a portable computingdevice; receiving, by the accessory, power from an external powersource; determining, by the accessory, a current capability of theexternal power source; determining, by the accessory, a net currentcapability by deducting a current requirement of the accessory from thecurrent capability of the external power source; and signaling, by theaccessory, via the connection to the portable computing device that theportable computing device is to draw a current having a limit equal tothe net current capability.
 2. The method of claim 1 wherein theexternal power source comprises a power converter, the power convertercoupled to an alternating-current power supply, wherein the powerconverter converts the alternating-current power supply to adirect-current power supply.
 3. The method of claim 1 wherein thecurrent capability of the external power source is determined by theaccessory by reading resistor values on at least one universal serialbus data pin.
 4. The method of claim 1 further comprising receiving, bythe accessory, a signal from the portable computing device acknowledgingthat the portable computing device received the signaling from theaccessory.
 5. The method of claim 1 wherein the accessory is a dockingstation.
 6. A method of operating a portable computing device, themethod comprising: establishing a connection between the portablecomputing device and an accessory; receiving, by the portable computingdevice, an indication of a current capability of an external powersource powering the accessory; receiving, by the portable computingdevice, a power instruction from the accessory, the power instructionindicating a current requirement of the accessory; determining, by theportable computing device, a net current capability by deducting thecurrent requirement of the accessory from the current capability of theexternal power source; and drawing, by the portable computing device, acurrent having a limit equal to the net current capability.
 7. Themethod of claim 6 wherein the external power source comprises a powerconverter, the power converter coupled to an alternating-current powersupply, wherein the power converter converts the alternating-currentpower supply to a direct-current power supply.
 8. The method of claim 6wherein the current capability of the external power source isdetermined by the portable computing device by reading resistor valueson at least one universal serial bus data pin.
 9. The method of claim 8wherein resistor values on the at least one universal serial bus datapin are provided by the external power source.
 10. The method of claim 6wherein the accessory is a docking station.